home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / pcedit32.zip / EDITOR.DOC < prev    next >
Text File  |  1993-05-29  |  24KB  |  430 lines

  1.  
  2.  
  3.  
  4. A Multi Platform Editor 
  5. by T.W. Steiner
  6.  
  7. Introduction
  8.  
  9.     With the plethora of different operating systems currently in use 
  10. it would be nice to have an editor that would work the same way on a 
  11. multitude of different machines running a variety of operating systems. 
  12. This then is the main design goal of this editor. The code should be very 
  13. easy to port since the operating system specific stuff has been kept to an 
  14. absolute minimum. Versions are available for UNIX and VMS systems as well 
  15. as for PCs running DOS. 
  16.  
  17.     Highlights of this editor include unlimited undo of previous 
  18. changes and corresponding step for step redo. Column editing features to 
  19. allow movement of columns of text (allows easy change of indentation). 
  20. Bracket matching of all sorts of brackets and C code comment delimiters. 
  21. There is a view mode which displays either; only the lines starting in the 
  22. first column to quickly locate the start of functions or only the changed 
  23. lines. Furthermore, a whole ring of files can be loaded up at once allowing 
  24. painless copying of text between files. The screen can also be split to 
  25. facilitate the comparison of two sections of code even if they are in 
  26. different files. One particularly nice feature is the ability to load up a 
  27. set of files in a ring and rapidly cycle through them using the <ctrl> N 
  28. and <ctrl> P key combinations. Text can be copied between these files by 
  29. using the block and line mark commands. There are all also some features to 
  30. facilitate carrying out complex repetitive editing tasks. In particular 
  31. sequences of key strokes can be saved and assigned to a function key for 
  32. subsequent reuse. Furthermore, any command including function key macros 
  33. can be repeated a number of times automatically by entering a command 
  34. multiplier. The editor is completely key configurable. A set of keystrokes 
  35. can be mapped to an editor function simply by specifying the sequence in 
  36. the auxilliary keymap file. The combination of key mapping and key macros 
  37. allow the editor to imitate the user interface of other editors or allow 
  38. the construction of a custom user interface to the taste of the user. 
  39.  
  40.     The editor is modeled after the E Editor, a PC editor. This editor 
  41. is however a functional superset of E with many useful additional features. 
  42. Furthermore, this editor was written entirely by T.W. Steiner in C without 
  43. the use of any pre existing code. Users of E will quickly feel at home with 
  44. this editor since despite the lack of a menu line the function keys perform 
  45. their familiar functions as the default setup. 
  46.  
  47.     To start the editor enter "editor file1 [-r -b] file2 file3". Each 
  48. file on the command line will be loaded into memory. Adding the optional -r 
  49. after a file specification indicates that the file is to be loaded for read 
  50. only. The optional -b means load the file in binary mode. In this mode the 
  51. file is displayed as a series of hex bytes with 32 bytes per line. There is 
  52. also an alternate binary display mode which still has 32 bytes per line but 
  53. displays control characters as ^S say and printable characters as .S. The 
  54. editor will look for an editor configuration file called editor.cfg in the 
  55. direectory specified by the EDITORPATH environment string. If this file is 
  56. not found then the current directory is searched for the file editor.cfg. 
  57. If this does not exist the editor is started in default mode. Changes made 
  58. to the default parameter settings or function key macros can be saved in a 
  59. new editor.cfg file to make them permanent. 
  60.  
  61.     The editor is extremely easy to use and largely self explanatory. 
  62. Text is input by straight typing anywhere on the screen. Cursor movement is 
  63. controlled by the arrow keys and auxiliary keypad keys as per their 
  64. standard definitions as well as accelerated movement with <CTRL> 
  65. combinations. The cursor position control keys are as follows: 
  66.  
  67. "Home" beginning of current line
  68. "up arrow" move up one line
  69. "PgUp" scroll up one screen
  70. "<-" move left one space
  71. "5"  toggle to fast cursor mode
  72. "->" move right one space
  73. "End" end of current line
  74. "down arrow" move down one space
  75. "PgDn" scroll down one screen
  76. "Insert" toggle between insert and replace modes
  77. "Del" delete character under cursor
  78.  
  79.     Any of the above cursor positioning keys hit in conjunction with 
  80. the CTRL key will result in accelerated motion identical to the description 
  81. below. (Note: CTRL key cursor positioning only works on PCs given the 
  82. limitations of most terminals) 
  83.  
  84.     There is also a fast movement toggle. Hitting the 5 key in the 
  85. middle of the numeric key pad will toggle fast movement on or off. In fast 
  86. mode (or in conjunction with the CTRL key) the keys have the following 
  87. effect 
  88.  
  89. "Home" beginning of file
  90. "up arrow" scroll up 5 lines
  91. "PgUp" beginning of file
  92. "<-" next word to left
  93. "5" toggle back to slow mode
  94. "->" next word to right
  95. "End" end of file
  96. "down arrow" scroll down 5 lines
  97. "PgDn" end of file
  98. "Del" delete word
  99.  
  100.  
  101. The Control Keys
  102.  
  103.     The  editor is  largely controlled  by Control letter combinations. 
  104. They are as follows: 
  105.  
  106. <ctrl A> - Toggle a place mark. A subsequent <ctrl> L will return the 
  107.        cursor to this location. Multiple place marks can be set.
  108. <ctrl B> - Bracket  match.  Hitting  this  combination  with  the  cursor 
  109.        sitting on a bracket or the start of a C comment will find the 
  110.        matching bracket. The search direction is set by the bracket type
  111. <ctrl D> - Delete character.  The  character  under  the  cursor  will 
  112.        be deleted.
  113. <ctrl E> - Delete to end of line.  All  characters  between  the  current 
  114.        cursor position and the end of the line will be deleted.
  115. <ctrl F> - Find next occurrence of the current search string.
  116. <ctrl G> - Go. Execute code (integrated C interpreter version only)
  117. <ctrl H> - <Backspace> Delete character to left of cursor.
  118. <ctrl I> - <Tab> Insert 8 spaces at current cursor location.
  119. <ctrl J> - Join lines. Join the next line to the current line. 
  120. <ctrl K> - Cut the current line. Splits the current line into  two  lines 
  121.        at the current cursor position.
  122. <ctrl L> - Return to last set place mark. Multiple ctrl L will cycle around 
  123.        the set of place marks. Place marks are set wirh ctrl A. 
  124. <ctrl M> - <carriage return> New line. Space for a new  line  is  made 
  125. <ctrl N> - Next file. Cycle to next  file  in  memory. The complement of   
  126.        <ctrl> P.
  127. <ctrl O> - Other window. Go to other window if screen is currently  split 
  128.        into two windows.
  129. <ctrl P> - Previous  File.  Cycle  to  previous  file  in  memory.  The 
  130.        complement of <ctrl> N
  131. <ctrl Q> - Quit. The current file is removed from memory  without  saving 
  132.        to disk. You will be prompted for confirmation if the file 
  133.        has been changed.
  134. <ctrl R> - Redo last undo. Any changes undone can be redone step by step.
  135. <ctrl S> - Swap next two letters.
  136. <ctrl T> - Toggle. Toggle insert/overwrite modes.
  137. <ctrl U> - Undo. Undoes changes to a file. All changes to  a  file  since 
  138.        the  start  of  editing  are  remembered.  Hitting  <ctrl>   U 
  139.        repeatedly allows these changes  to  be  undone  one  by  one. 
  140. <ctrl V> - View. Toggles to view mode where only lines starting in the 
  141.        first column are displayed i.e. generally the start of all the
  142.        functions. This is very useful  for moving quickly to a      
  143.        function. Hit <ctrl> V, put the cursor on the desired function 
  144.        and then hit <Ctrl> V again to expand to full file.
  145. <ctrl W> - Write. Writes file to disk  but  does  not  remove  file  from 
  146.        memory.
  147. <ctrl X> - Erase and remove entire line. Identical to CTRL Back.
  148. <ctrl Y> - Split screen. Splits the screen into two halves or restores 
  149.        single screen if currently split.
  150. <ctrl Z> - Zap word. Deletes whole word.
  151. <ctrl ^> - Move marked block to left. A block marked using the block mark
  152.        commands discussed next can be moved using this command. This
  153.        is very useful for changing the indentation of  a  section  of 
  154.        code. 
  155. <ctrl _> - Move marked block to right. Complement to <ctrl> ^.   
  156. <ctrl \> - Turn on key mapping as specified in  the file edi